#pragma once

#include "main.h"
#include "cml\cml.h"

using namespace cml;
class InputState;

class Camera
{
public:
	Camera();
	Camera(int clientWidth, int clientHeight);
	virtual ~Camera();

	void updateCamera(const InputState& refInputState);

	const matrix44f& GetView() const { return m_matView; }
	const matrix44f& GetProj() const { return m_matProj; }
	const matrix44f& GetViewProj() const { return m_matViewProj; }

	const vector3f& GetRight() const { return m_RightW; }
	const vector3f& GetUp() const { return m_UpW; }
	const vector3f& GetLook() const { return m_LookW; }
	const vector3f& GetPos() const { return m_PosW; }

	void SetPos(const vector3f& pos);

private:
	// Save camera related matrices.
	
	matrix44f m_matView;
	matrix44f m_matProj;
	matrix44f m_matViewProj;

	// GraphCamera Position Relative to world space.
	vector3f m_PosW;
	//unity vector the descrobes the camera's right 
	vector3f m_RightW;
	//the upvector of the camera
	vector3f m_UpW;
	//unity vector that describes the direction the camera looks at
	vector3f m_LookW;

	Camera(const Camera& m);
	Camera& operator=(const Camera& m);
};